package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.dto.SetmealDto;
import com.itheima.reggie.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SetmealMapper extends BaseMapper<Setmeal> {

    /**
     * 按条件分页查询套餐
     * @param page
     * @param name
     * @return
     */
    Page<SetmealDto> querySetMealByPage(@Param("page") Page<SetmealDto> page,
                                        @Param("name") String name);

    /**
     * 根据套餐id查询套餐和套餐下的菜品
     * @param id
     * @return
     */
    SetmealDto querySetMealById(Long id);
}


